package com.swm.model;


import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlRootElement(name = "User")
public class User {
	
	public User(){
		
	}
	public User(String id, String password) {
		super();
		this.id = id;
		this.password = password;
	}
	private String id;
	private String password;

	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	public boolean isEqual( User user ){
		if( id.equals( user.getId()) && password.equals( user.getPassword() ))
			return true;
		return false;
	}
	
	public boolean isEqual( String userID ){
		if( id.equals( userID ))
			return true;
		return false;
	}
	public boolean isEmpty() {
		// TODO Auto-generated method stub
		if ( id.equals(""))
			return true;
		return false;
	}
}
